package org.ufpe.cin.ip.projeto.Test.dados.Repositorios.Lista;

import org.ufpe.cin.ip.projeto.Exceptions.ElementNotExistsException;
import org.ufpe.cin.ip.projeto.Util.ListaObjects;

public class TesteLista {
	public static void main(String[] args){
		ListaObjects<Integer> list = new ListaObjects<Integer>();
		
		try {
			System.out.println("Tamanho: "+list.length());
			list.add(new Integer(10));
			System.out.println("Tamanho: "+list.length());
			list.add(new Integer(15));
			System.out.println("Tamanho: "+list.length());
			list.add(new Integer(8));
			
			System.out.println(list.getValueAt(0));
			System.out.println(list.getValueAt(1));
			System.out.println(list.getValueAt(2));
			System.out.println("Tamanho: "+list.length());
			
			list.insertAt(2, new Integer(22));
			System.out.println("Tamanho: "+list.length());
			
			System.out.println(list.getValueAt(2));

			list.add(new Integer(8));
			System.out.println("Tamanho: "+list.length());
			
			list.removeAt(0);
			System.out.println("Tamanho: "+list.length());
			list.add(new Integer(8));
			System.out.println("Tamanho: "+list.length());
			list.removeAt(1);
			list.removeAt(2);
			list.removeAt(3);
			System.out.println("Tamanho: "+list.length());
			System.out.println(list.getValueAt(0));
			System.out.println(list.getValueAt(1));
			System.out.println(list.getValueAt(2));
			list.removeAt(0);
			System.out.println(list.getValueAt(0));
			System.out.println(list.getValueAt(1));
			System.out.println(list.getValueAt(2));
			
			
			
		} catch (ElementNotExistsException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}
}
